package com.ym.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ym.entity.SysUser;
import com.ym.mapper.SysUserMapper;
import com.ym.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements SysUserService {

    @Autowired
    private SysUserMapper sysUserMapper;

    @Override
    public IPage<SysUser> selectByExample(IPage<?> page, SysUser example) {
        return sysUserMapper.selectByExample(page, example);
    }

    @Override
    public List<String> getRoleNames(Integer userId) {
        return sysUserMapper.getRoleNames(userId);
    }

    @Override
    public List<String> getPermissionNames(Integer userId) {
        return sysUserMapper.getPermissionNames(userId);
    }
}